namespace ModelFirst
{
    using System;
    using System.Data.Entity;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Linq;

    public partial class BlogContext : DbContext
    {
        public BlogContext()
            : base("name=BlogContext")
        {
        }

        public virtual DbSet<Address> Addresses { get; set; }
        public virtual DbSet<Article> Articles { get; set; }
        public virtual DbSet<Author> Authors { get; set; }
        public virtual DbSet<Blog> Blogs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //modelBuilder .Entity< Author >().Property( c=>c.Email).
          
            //modelBuilder.Entity<Author>()
            //    .HasMany(e => e.Addresses)
            //    .WithRequired(e => e.Author)
            //    .WillCascadeOnDelete(false);
        }
    }
}
